'''
Created on Aug 9, 2013

@author: csiebern
'''
import T3D
import matplotlib.pyplot as plt
import numpy as np

LASFile = '../LiDAR/Rt_Seiler/Rt_130718(1).las'
LiDAR   = T3D.LiDAR(LASFile)
 
X = LiDAR.data['LASF_X']
Y = LiDAR.data['LASF_Y']
Z = LiDAR.data['LASF_Z']
t = LiDAR.data['G3D_GPSTIME']
H = LiDAR.data['G3D_AngleH']*180/np.pi
T3D_XYZ = T3D.toSensorXYZ(LiDAR)
        
Xc = T3D_XYZ[0,:]
Yc = T3D_XYZ[1,:]
Zc = T3D_XYZ[2,:]
dZ = Zc-Z

k = range(X.size)

xmin = 1350
xmax = 1850
ymin = -0.05
ymax = 0.05
plt.figure(1)

plt.subplot(311)
plt.plot(k,Z,'g-',k,Zc,'r-')
plt.title('Z vs. epoch')
plt.axis([xmin,xmax,ymin,ymax])

plt.subplot(312)
plt.plot(k,Z-Zc)
plt.title('dZ vs. epoch')
plt.axis([xmin,xmax,2*ymin,2*ymax])

plt.subplot(313)
plt.plot(k,H)
plt.title('Horizontal Angle vs. epoch')
plt.axis([xmin,xmax,0,360])

plt.show()